/**
 * index
 */
define(function(require) {
    var $ = require('jquery');
    var com = require('./common');

	com.layoutSet();

    axios.get(com.api.structure).then(function(response){                
        //性别
        com.chart3("chart1",response.data.sex.name,response.data.sex.num,'pie','','right',['30%', '55%'],response.data.sex.color);
        //民族
        com.chart3("chart2",response.data.minzu.name,response.data.minzu.num,'pie','','right',['30%', '55%'],response.data.minzu.color);
        //宗教
        com.chart3("chart3",response.data.zongjiao.name,response.data.zongjiao.num,'pie','','right',['30%', '55%'],response.data.zongjiao.color);
        //年龄
        com.chart3("chart4",response.data.age.name,response.data.age.num,'pie','','right',['30%', '55%'],response.data.age.color);
        //文化程度
        com.chart3("chart5",response.data.wenhua.name,response.data.wenhua.num,'pie','','right',['30%', '55%'],response.data.wenhua.color);
        //党派
        com.chart3("chart6",response.data.dangpai.name,response.data.dangpai.num,'pie','','right',['30%', '55%'],response.data.dangpai.color);
        //行业
        com.chart3("chart7",response.data.hangye.name,response.data.hangye.num,'pie','','right',['30%', '55%'],response.data.hangye.color);
        //人权
        com.chart2("chart8",response.data.renquan.name,response.data.renquan.num,'bar',response.data.renquan.color);
    });

    com.loading_finished();

});